import org.gradle.api.artifacts.Dependency
import org.gradle.api.artifacts.dsl.DependencyHandler
import org.gradle.kotlin.dsl.project

fun DependencyHandler.debugImplementation(dependencyNotation: String): Dependency? =
    add("debugImplementation", dependencyNotation)

fun DependencyHandler.implementation(dependencyNotation: String): Dependency? =
    add("implementation", dependencyNotation)

fun DependencyHandler.apiProject(projectPath: String): Dependency? =
    project(path = projectPath, configuration = "api")

fun DependencyHandler.releaseApi(dependencyNotation: String): Dependency? =
    add("releaseApi", dependencyNotation)

fun DependencyHandler.debugApi(dependencyNotation: String): Dependency? =
    add("debugApi", dependencyNotation)

fun DependencyHandler.kapt(dependencyNotation: String): Dependency? =
    add("kapt", dependencyNotation)

fun DependencyHandler.testImplementation(dependencyNotation: String): Dependency? =
    add("testImplementation", dependencyNotation)

fun DependencyHandler.androidTestImplementation(dependencyNotation: String): Dependency? =
    add("androidTestImplementation", dependencyNotation)

/**
 * 给插件实现模块配置通用依赖
 */
fun DependencyHandler.addPluginUniversalDependencies() {
    implementation(Deps.kotlinLib)
}